<?php 
include_once('connection/connection.php');
include('header.php');
include('menu.php');
include('config.php');
$frm=$_SESSION['form_id'];
$id1=$_SESSION['id1'];
$dis_name=$_SESSION['dis_name'];
$qr="select * from tbl_dtls_q3_loc where form_id='$frm'";
$res=mysql_query($qr);
$row1=mysql_fetch_array($res);
if(isset($_POST['back']))
{ 
	header('Location: view_q3_4.php');
}	
if(isset($_POST['submit']))
{ 
	header('Location: view_q3_6.php');
}	
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="css/style_question.css" type="text/css" rel="stylesheet" />
<title>View Q3</title>
</head>
<body>
<div align="center">
<form action="" method="post" enctype="multipart/form-data" name="questionnaire3_5" id="questionnaire3_5" onSubmit="return validate5()">
	<table border="0" width="800" id="table1" cellspacing="0" cellpadding="0">
		<tr>
			<td height="30">
			<p align="center">
			<font face="Verdana" style="font-size: 10pt; font-weight: 700" color="#000000">
			Questionnaire No. 3</font></td>
		</tr>
		<tr>
			<td height="19">
			<p align="center">
			<font face="Arial" style="font-size: 8.5pt" color="#000000">For 
			Field Survey (Village Level questionnaire) </font></td>
		</tr>
		<tr>
			<td height="18">
			<p align="center">
			<font style="font-size: 8.5pt" face="Arial" color="#000000">Page 5</font></td>
		</tr>
		<tr>
			<td><span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#000000">&nbsp;Form Id = <?php echo $frm?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;District Name = <?php echo $dis_name?></font></span></td>
		</tr>
		<tr><td>&nbsp;</td></tr>
		<tr>
			<td bgcolor="#EEEEEE" height="20"><font color="#000000">&nbsp;
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt">10. Data of Reservoires 
			(GLRS and GLSR) </font></span></font></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>
				<font face="Verdana" style="font-size: 8.5pt" color="#990000" bgcolor="#F7E6B7">&nbsp;Total no. of GLRS:  
				<label id="num_glrs"><?php echo "$row1[num_glrs]";?></label></font></td>
		</tr>
		<tr><td>&nbsp;</td></tr>
		<tr><td>
			<table width="968"  border="1" cellpadding="0" bgcolor="#FDF9EE" id="table7" style="border-collapse:collapse; border-color:#99CCCC;">
		<tr>
		<td width="58" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">&nbsp;</font></td>
		<td width="71" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Location</font></td>
		<td width="65" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Longitude</font></td>
		<td width="67" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Latitude</font></td>
		<td width="138" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Owned By</font></td>
		<td width="84" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Capacity(KL)</font></td>
		<td width="117" align="center" bgcolor="#F7E6B7"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Status</font></td>
		<td width="164" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Condition of Reservoirs</font></td>
		<td width="164" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Connected or Not with pipeline</font></td>
		</tr>
		<?php
			$qr2="select * from tbl_dtls_q3_reservoirs where loc_id='$id1' and reserv_id LIKE 'GLR%' order by 0+replace(reserv_id,'GLR','')";
			$res2=mysql_query($qr2);
			while($row2=mysql_fetch_array($res2))
			{
		?>
	<tr>
	<td><label id="reserv_id1"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row2[reserv_id]";?></font></label></td>
		<td width="71" align="center">
	  <label id="reserv_location1"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row2[reserv_location]";?></font></label></td>
	  <td width="65" align="center"><label id="reserv_longitude1"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row2[reserv_longitude]";?></font></label></td>
	  <td width="67" align="center"><label id="reserv_latitude1"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row2[reserv_latitude]";?></font></label></td>
		<td align="center" width="138">
			<label id="reserv_supply1"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row2[reserv_supply]";?></font></label></td>
	 	<td align="center" width="84">
	  <label id="reserv_capacity"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row2[reserv_capacity]";?></font></label></td>
	  	<td align="center" width="117"><label id="reserv_status"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row2[reserv_status]";?></font></label></td>
	  	<td align="center" width="164">
			<label id="reserv_condition1"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row2[reserv_condition]";?></font></label></td>
		<td align="center" width="164">
			<label id="reserv_connect"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row2[reserv_connect]";?></font></label></td>		
	</tr>	
<?php 
}
?>
</table></td></tr>
		<tr><td>&nbsp;</td></tr>
		<tr><td><font face="Verdana" style="font-size: 8.5pt" color="#990000" bgcolor="#F7E6B7">&nbsp;Total no. of GLSR:  
				<label id="num_glsr"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row1[num_glsr]";?></label></font>	
		</td></tr>
		<tr><td>&nbsp;</td></tr>
		<tr><td>
			<table width="970"  border="1" cellpadding="0" bgcolor="#FDF9EE" id="table7" style="border-collapse:collapse; border-color:#99CCCC;">
			<tr>
		<td width="58" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">&nbsp;</font></td>
		<td width="70" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Location</font></td>
		<td width="70" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Longitude</font></td>
		<td width="70" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Latitude</font></td>
		<td width="147" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Owned By</font></td>
		<td width="78" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Capacity(KL)</font></td>
		<td width="114" align="center" bgcolor="#F7E6B7"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Status</font></td>
		<td width="165" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Condition of Reservoirs</font></td>
		<td width="158" align="center" bgcolor="#F7E6B7">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Connected or Not with pipeline</font></td>
			</tr>
		<?php
			$qr2="select * from tbl_dtls_q3_reservoirs where loc_id='$id1' and reserv_id LIKE 'GLSR%' order by 0+replace(reserv_id,'GLSR','')";
			$res2=mysql_query($qr2);
			while($row3=mysql_fetch_array($res2))
			{
		?>
	<tr>
		<td><label id="reserv_id2"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row3[reserv_id]";?></font></label></td>
		<td width="70" align="center">
			<label id="reserv_location2"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row3[reserv_location]";?></font></label></td>
		<td width="70" align="center">
			<label id="reserv_longitude2"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row3[reserv_longitude]";?></font></label></td>
		<td width="70" align="center">
			 <label id="reserv_latitude2"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row3[reserv_latitude]";?></font></label></td>
		<td align="center" width="147">
			<label id="reserv_supply2"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row3[reserv_supply]";?></font></label></td>
	 	<td align="center" width="78">
			<label id="reserv_capacity2"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row3[reserv_capacity]";?></font></label></td>
	  	<td align="center" width="114"> <label id="reserv_status"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row2[reserv_status]";?></font></label></td>
	  	<td align="center" width="165">
			<label id="reserv_condition2"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row3[reserv_condition]";?></font></label></td>
		<td align="center" width="158">
			<label id="reserv_connect2"><font face="Verdana" style="font-size: 8.5pt"><?php echo "$row3[reserv_connect]";?></font></label></td>
	</tr>
	<?php
	} 
?>
</table></td></tr>	
			<tr><td>&nbsp;</td></tr>
			<tr><td>&nbsp;</td></tr>	
			<tr>
				<td align="center">
				<input type="submit" value="Back" name="back" style="font-size: 8pt;font-family:Verdana; border-style: solid; border-width: 1px">&nbsp;&nbsp;
					<input type="submit" value="Next" name="submit" id="submit", style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px">
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
			</tr>
		</table>
  </form>
</div>
</body>
</html>
